﻿<?php
include ("../conn.php");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>管理登陆</title>
<link href="css/admin.css" rel="stylesheet" type="text/css" />
<SCRIPT language=javascript>
function Checklogin()
{
	if (form1.user.value=="")
	{
		alert("请填写登录名");
		form1.user.focus();
		return false;
	}
	if (form1.pwd.value=="")
	{
		alert("密码不能为空");
		form1.pwd.focus();
		return false;
	}
}
</SCRIPT>
</head>
<body style="margin:0 auto;">
<div style="width:300px;margin:0 auto;">
 <form name="form1" method="POST" action="check.php" onsubmit="return Checklogin();">
 <div>
 <div>
 	用户名：<input name="user" type="text" />
 </div>
 <div>
 	密　码：<input name="pwd" type="password" />
 </div>
 <div>      
  <input type="submit" name="Submit" value="提交" />   
  <input type="reset" name="Submit2" value="重置" />
 </div>
 </div>
 </form>
</div>
<div>
	<?php
	$query=mysqli_query($con," SELECT * FROM admin");
    $row=mysqli_fetch_array($query,MYSQLI_ASSOC);
    mysqli_close($con);
    //print_r($row);
    //echo "<br />".$use1=$row['usename'];
    //echo "<br />".$pwd1=$row['pwd'];
	?>
</div>
</body>
</html>